package main

import (
	_ "steam_api/routers"

	"github.com/astaxie/beego"
	"github.com/astaxie/beego/orm"
	_"github.com/mattn/go-sqlite3"
	"steam_api/models"
)

func init()  {
	orm.RegisterDataBase("default","sqlite3","orm_test?charset=utf8&loc=Asia%2FShanghai",30)
	orm.RegisterModel(new(models.SteamUser))
	orm.RunSyncdb("default",false,true)
}

func main() {


	beego.SetLogger("file",`{"filename":"logs/beego/beego.log"}`)
	if beego.BConfig.RunMode == "dev" {
		beego.BConfig.WebConfig.DirectoryIndex = true
		beego.BConfig.WebConfig.StaticDir["/swagger"] = "swagger"
	}
	beego.Run()
}
